<script lang="tsx">
import { defineComponent } from 'vue'

import Son from './Son.vue'

export default defineComponent({
  setup() {
    const slots = {
      default: () => 123,
      gender: () => <span>男</span>,
      fullName(slotProps) {
        return [
          <span>{slotProps.firstName}</span>,
          <span>{slotProps.lastName}</span>,
        ];
      },
    };

    // 注意: 在 jsx 中，应该使用 v-slots 代替 v-slot
    return () => <Son v-slots={slots}/>;
  },
});
</script>
